<template>
  <div class="navi">
    <a
      @click.prevent="$router.push({path: route.link})"
      v-for="route of routes"
      :class="{ chosen: route.chosen }"
      :href="route.link"
      :key="route.name">
        {{ route.name }}
    </a>
  </div>
</template>
<script>
export default {
  name: 'Navigate',
  props: {
    routes: {
      type: Array,
      required: true,
      default: () => [],
    },
  },
};
</script>
<style lang="less">
@import url(../../../static/style/site.comm.less);
@import url(../../../static/style/site.vars.less);
.navi {
  box-sizing: border-box;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
  height: 40px;
  // background: #fff;
  display: flex;
  justify-content: left;
  align-items: center;
  font-size: 0;
  border-bottom: 1px rgba(163, 163, 163, 0.288) solid;
  & > a {
    color: rgb(0, 62, 133) !important;
    font-size: 14px;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px 0 20px;
    border-bottom: 3px transparent solid;
    &:hover {
      transition: all .5s ease;
      border-bottom: 3px #1890FF solid;
      color: #1890FF !important;
    }
    &.chosen {
      color: #1890FF !important;
      border-bottom: 3px #1890FF solid;
    }
  }
}
</style>
